package com.itheima.mapper;

import com.itheima.entity.Clazz;
import com.itheima.entity.ClazzsQueryParam;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description ClazzsMapper
 * @Author 你的名字拼接或昵称
 * @Date 2025-09-06
 */
@Mapper
public interface ClazzsMapper {


    List<Clazz> list(ClazzsQueryParam clazzsQueryParam);


    void save(Clazz clazz);

    @Select("select * from clazz where id = #{id}")
    Clazz getId(Integer id);


    void update(Clazz clazz);

    @Delete("delete from clazz where id= #{id}")
    void delete(Integer id);

    @Select("select id, name, room, begin_date, end_date, master_id, subject, create_time, update_time from clazz ")
    List<Clazz> getlist();
}
